﻿@model Site3AI.Models.aspnet_Users

@{
    ViewBag.Title = "个人信息";
    ViewBag.Back = "/";
}
<div data-role="navbar">
    <ul>
        <li>@Html.ActionLink("基本信息", "Me", null, new { @class = "ui-btn-active site-nav-active" })</li>
        <li>@Html.ActionLink("历次住院", "MyEnhosp")</li>
    </ul>
</div>
<!-- /navbar -->

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset class="edit-fieldset">
        <legend>基本信息</legend>
        <div class="hidden-fields">
            @Html.HiddenFor(model => model.UserId)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.UserName)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.UserName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.MobileAlias)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.MobileAlias)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.MobileAliasB)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.MobileAliasB)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Gender)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.Gender)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.BirthDay)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.BirthDay)
        </div>
        <div class="editor-label">
            <label>年龄</label>
        </div>
        <div class="editor-field">
            @Helpers.GetAgeRaw(Model.BirthDay)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.HuanZheLaiYuan)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.HuanZheLaiYuan)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.HomePhone)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.HomePhone)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.HomePhoneB)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.HomePhoneB)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.SheBaoHao)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.SheBaoHao)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IDCodeType)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.IDCodeType)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IDCode)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.IDCode)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.OtherPhone)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.OtherPhone)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.OtherPhoneB)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.OtherPhoneB)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.UserHeight)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.UserHeight)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.UserWeight)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.UserWeight)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Email)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.Email)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Address)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.Address)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.PostCode)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.PostCode)
        </div>
        @{
    try
    {
        var wxset = SiteUser.UserSettings.Where(v => v.SettingName.StartsWith("wx.")).ToArray();
        if (wxset.Length > 0)
        {
            <div class="editor-label">
                <label>其他信息</label>
            </div>
            <div class="editor-field">
            </div>
            <hr />
            <dl>
                <dd>
                    <img style="max-width:80px" src="@(wxset.First(v => v.SettingName == "wx.headImg").SettingValue)" alt="" /></dd>
                <dd><b>微信绑定</b></dd>
                <dd>@(wxset.First(v => v.SettingName == "wx.nickname").SettingValue)</dd>
                <dd>@(wxset.First(v => v.SettingName == "wx.addr").SettingValue)</dd>

            </dl>
            <hr />
        }
    }
    catch (Exception exwx)
    {
    }

        }
        <p>
            <input type="submit" value="修改个人信息" />
        </p>

    </fieldset> 


}

@section Scripts {
    <style>
        .ui-mobile fieldset
        {
            /* margin: 0 1em 0 1em;*/
            margin: 0px;
        }

        .editor-label, .editor-field
        {
            line-height: 36px;
            padding: 0 1em 0 1em;
            min-width: 65px;
            border-bottom: 1px dotted #eaeaea;
            border-top: 1px solid white;
            height: 36px;
        }

        .editor-label
        {
            float: left;
            background-color: #f1f1f1;
            clear: left;
            font-weight: bold;
        }

        .editor-field
        {
            /*float: left;*/
            clear: right;
            background-color: white;
        }
    </style>
    @Scripts.Render("~/bundles/jqueryval")
}
